<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>myUploader</title>
    <script src="/scripts/boot.js"></script>
    <link rel="stylesheet" type="text/css" href="/scripts/uploadDemo/css/webuploader.css" />
    <link rel="stylesheet" type="text/css" href="/scripts/uploadDemo/css/style.css" />
</head>
<body onload="" style="overflow:hidden;">
    <div id="wrapper">
        <div id="container">
            <!--头部，相册选择和格式选择-->
            <div id="uploader">
                <div class="queueList">
                    <div id="dndArea" class="placeholder">
                        <div id="filePicker"></div>
                    </div>
                </div>
                <div class="statusBar" style="display:none;">
                    <div class="progress">
                        <span class="text">0%</span>
                        <span class="percentage"></span>
                    </div><div class="info"></div>
                    <div class="btns">
                        <div id="filePicker2"></div><div class="uploadBtn">开始上传</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="chose-toolbar">
        <input name="fileUrl" id="file_url" class="mini-hidden"  />
        <input name="fileName" id="file_name" class="mini-hidden" />
        <a class="chose-button" onclick="CloseWindow('close')">取消</a>
        <a class="chose-button save-button" onclick="uploadFile.save()">保存</a>
    </div>
    <script src="/scripts/uploadDemo/js/jquery.js"></script>
    <script src="/scripts/uploadDemo/js/webuploader.js"></script>
    <script src="/scripts/uploadDemo/js/upload.js"></script>
    <script type="text/javascript">
        mini.parse();
        var uploadFile={
            getURLParameter: function (name) {
                // return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null;
            },
            //上传
            setFile_url: function(url){
                var old_url=mini.get('file_url').getValue();
                if(old_url!=""){
                    old_url=old_url+";"
                }
                mini.get('file_url').setValue(old_url+url);
            },
            setFile_name: function(name) {
                var old_name=mini.get('file_name').getValue();
                if(old_name!=""){
                    old_name=old_name+";"
                }
                mini.get('file_name').setValue(old_name+name);
            },
            save :function(){
                // $('.uploadBtn').trigger('click');
                if(mini.get('file_url').getValue()==""){
                    alert("请上传文件！");
                    return;
                }
                // var isComplete= uploadFile.getURLParameter("isComplete");
                top["win"].view.setFile_url(mini.get('file_url').getValue());
                top["win"].view.setFile_name(mini.get('file_name').getValue());
                CloseWindow('close');
            },
            setDate:function (data) {
                console.log(data)
            }
        };
    </script>
</body>
</html>